package designMode.decoratorPattern;

/**
 * @ClassName Mocha
 * @Description  调料1
 * @Author LIBOFEI
 * @Date 2020/6/15 16:17
 * @Version 1.0
 **/
public class Mocha extends CondimentDecorator{
    Beverage beverage;

    public Mocha(Beverage beverage){
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",MOCHA";
    }

    @Override
    public int getSize() {
        return beverage.getSize();
    }

    @Override
    public double cost() {
        return 20 + beverage.cost();
    }
}
